﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudSharingStation_UWP_.Model
{
    class StudyResource
    {
        public string fileName { get; set; }
        public string department {get;set;}
        public string uploaderName { get; set; }
        public string fileCategory { get; set; }
        public Double fileSize { get; set; }
        public List<Comment> comments { get; set; }

		public string imgPath
        {
            get
            {
                switch (this.fileCategory)
                {
                    case ".pdf": return @"/Assets/pdf.png"; break;
                    case ".ppt": return @"/Assets/ppt.png"; break;
                    case ".pptx": return @"/Assets/ppt.png"; break;
                    case ".doc": return @"/Assets/doc.png"; break;
                    case ".docx": return @"/Assets/doc.png"; break;
                    case ".xls": return @"/Assets/xls.png"; break;
                    case ".xlsx": return @"/Assets/xls.png"; break;
                    case ".rar": return @"/Assets/rar.png"; break;
                    case ".mp4": return @"/Assets/mp4.png"; break;
                    case ".txt": return @"/Assets/txt.png"; break;
                    default: return @"/Assets/txt.png"; break;       
                }
            }
        }

        public List<Comment> GetComments()
        {
            return this.comments;// 本次大作业中不做实现
        }
    }
}
